package summer_vacation.lvchang.myyVacation;

/**
 * Created by Administrator on 2015/9/7.
 */
public class Text11 {
    public static void main(String[] args) {
        int N = 200;
       int cout=0;
        boolean [] a = new boolean[N+1];
        for( int i=0; i<=N; i++ ) a[i]=true;
        for( int i=2; i<=N; i++ ){
            for( int j=2*i; j<=N; j += i ){
                a[j] = false;
            }
        }
        for( int i=2; i<=N; i++ ){
            if( a[i] ) {
          cout++;
          if(cout%10==0)
          {System.out.println();}
                System.out.print(" "+ i );}
        }
    }
}
